CC=gcc

#CFLAGS=-c -O3 -DNDEBUG -funroll-loops -fomit-frame-pointer -ftree-vectorize -finline-functions -ftree-vect-loop-version -ftree-loop-optimize -ffast-math -fno-rtti -fno-exceptions `pkg-config --cflags bullet`
#LDFLAGS=`pkg-config --libs bullet` -lpthread -lGL -lGLU -lglut -O3 -DNDEBUG -funroll-loops -fPIC -fomit-frame-pointer -ftree-vectorize -finline-functions -ftree-vect-loop-version -ftree-loop-optimize -ffast-math -fno-rtti -fno-exceptions

CFLAGS=-c `pkg-config --cflags bullet` -O3 
LDFLAGS=-L/usr/local/lib/ `pkg-config --libs bullet` -O3 -lpthread -lGL -lGLU -lglut
SOURCES=main.cpp AngryBr3ds.cpp Cameras.cpp GL/*.o GL/SOIL_src/libSOIL.a
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=main

all: $(SOURCES) $(EXECUTABLE)
	
$(EXECUTABLE): $(OBJECTS) 
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@
